#ifndef ___GLTOOLS_TUBE_HPP___
#define ___GLTOOLS_TUBE_HPP___

#include <vector>
#include <util/colour.hpp>
#include <util/point.hpp>

namespace util {
  class tube {
  public:
    enum end_type {
      open_end,
      flat_end,
      sphere_end
    };

    tube(double width = 1.0, util::colour c = util::colour(), end_type t = open_end, bool open = true);

    void         add_point(const util::point& p);
    util::point& get_point(unsigned int i);
    unsigned int count() const;
    void         render() const;

  private:
    double                   width;
    util::colour             colour; 
    end_type                 end;
    bool                     open;
    std::vector<util::point> points;
  };
}

#endif
